

export const showLoading = function (Vue) {
    // window.onload = () => {
        // const root = document.querySelector(".container-box");
        const root = document.body;
        if (root.querySelector(".loading-animation")) {
            root.removeChild(root.querySelector(".loading-animation"));
        }
        var loadingBox = document.createElement("div");
        loadingBox.setAttribute("class", "loading-animation");
        var bounce1 = document.createElement("div");
        bounce1.setAttribute("class", "bounce1");
        var bounce2 = document.createElement("div");
        bounce2.setAttribute("class", "bounce2");
        var bounce3 = document.createElement("div");
        bounce3.setAttribute("class", "bounce3");
        loadingBox.appendChild(bounce1);
        loadingBox.appendChild(bounce2);
        loadingBox.appendChild(bounce3);
        root.appendChild(loadingBox);
        // let store = Vue.$store;
        // store.commit("gw/setLoadingState", 1);
        // console.log("-00-0-0-00000000000000000000000000", this);
    // }

}

export const hideLoading = function () {
    // const root = document.querySelector(".container-box");
    const root = document.body;
    if (root.querySelector(".loading-animation")) {
        root.removeChild(root.querySelector(".loading-animation"));
    }
}
